package com.itheima.controller;

import com.itheima.DeptSrrivce.impl.DempServiceimpl;
import com.itheima.pojo.Dept;
import com.itheima.pojo.Result;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;




@RestController
public class deptconller {
    private DempServiceimpl deptSerivceImpl = new DempServiceimpl();
    @GetMapping("/dept")
    public Result List(){
        List<Dept> deptList = deptSerivceImpl.queryDeptList();
        return Result.success(deptList);
    }

}
